package com.ruoyi.sj.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.sj.mapper.TradingRecordMapper;
import com.ruoyi.sj.domain.TradingRecord;
import com.ruoyi.sj.service.ITradingRecordService;
import com.ruoyi.common.support.Convert;

/**
 * 零钱交易明细 服务层实现
 * 
 * @author tyc@yanyu.com
 * @date 2018-12-04
 */
@Service
public class TradingRecordServiceImpl implements ITradingRecordService 
{
	@Autowired
	private TradingRecordMapper tradingRecordMapper;

	/**
     * 查询零钱交易明细信息
     * 
     * @param id 零钱交易明细ID
     * @return 零钱交易明细信息
     */
    @Override
	public TradingRecord selectTradingRecordById(Long id)
	{
	    return tradingRecordMapper.selectTradingRecordById(id);
	}
	
	/**
     * 查询零钱交易明细列表
     * 
     * @param tradingRecord 零钱交易明细信息
     * @return 零钱交易明细集合
     */
	@Override
	public List<TradingRecord> selectTradingRecordList(TradingRecord tradingRecord)
	{
	    return tradingRecordMapper.selectTradingRecordList(tradingRecord);
	}
	
    /**
     * 新增零钱交易明细
     * 
     * @param tradingRecord 零钱交易明细信息
     * @return 结果
     */
	@Override
	public int insertTradingRecord(TradingRecord tradingRecord)
	{
	    return tradingRecordMapper.insertTradingRecord(tradingRecord);
	}
	
	/**
     * 修改零钱交易明细
     * 
     * @param tradingRecord 零钱交易明细信息
     * @return 结果
     */
	@Override
	public int updateTradingRecord(TradingRecord tradingRecord)
	{
	    return tradingRecordMapper.updateTradingRecord(tradingRecord);
	}

	/**
     * 删除零钱交易明细对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteTradingRecordByIds(String ids)
	{
		return tradingRecordMapper.deleteTradingRecordByIds(Convert.toStrArray(ids));
	}
	
}
